#1-100求和
import random

i=1
sum=0
while i<=100:
    sum+=i
    i+=1
print(sum)
#猜数字
ans=random.randint(1,100)
print(f"ans={ans}")
flag=True
while flag:
    temp=int(input("请输入你要猜测的值："))
    if ans==temp:
        print("success")
        flag=False
    elif temp>ans:
        print("猜大了")
    else:
        print("猜小了")
#九九乘法表
i=1
while i<=9:
    j=1
    while j<=i:
        print(f"{j}*{i}={j*i}",end="\t")
        j+=1
    print()
    i+=1
#for 一共几个a
print("_______________for___________")
count=0
str="itheima is a brand of itcast"
for x in str:
    if x=="a":
        count+=1
print("a有：",count,"个")
#1-100有几个偶数
count=0
for i in range(1,101,1):
    if i%2==0:
        count+=1
print(f"偶数有：",count)
#九九乘法表for
for i in range(1,10,1):
    for j in range(1,i+1,1):
        print(f"{j}*{i}={j*i}",end="\t")
    print()
#发工资
mony=10000
for i in range(1,21,1):
    if mony - 1000 < 0:
        print("工资发完了，下个月来领取吧")
        break
    flag=random.randint(1,10)
    if flag<5:
        print(f"员工{i}，绩效分{flag}，低于5，不发工资，下一个")
        continue
    else:
        mony-=1000
        print(f"向员工{i}，发放1000元工资，账户余额还剩{mony}元")